package com.ktjy.config;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class CustoMyMetaObjectHandler implements MetaObjectHandler {
    @Override
    public void insertFill(MetaObject metaObject) {

    }



    @Override
    public void updateFill(MetaObject metaObject) {

        Date date = new Date();
        System.out.println(date.getHours());
        System.out.println(date.getTime());
        System.out.println(System.currentTimeMillis());
        //业务数据初始化
        this.strictUpdateFill(metaObject,"updateTime", Date.class,date);

    }
}
